const { wyy_request } = require("../../../util/wyy_request");
const APIError = require("../../../middlewares/rest").APIError;


let lyric = async (ctx) => {
    if (ctx.request.method === 'GET') {
        var mid = ctx.request.query.mid || '33894312';
        // console.log(typeof ctx.request.query.limit, limit);
    } else if (ctx.request.method === 'POST') {
        var mid = ctx.request.body.mid || '33894312';
    }

    let result = await wyy_request(`https://music.163.com/api/song/lyric`, {
        lv: -1,
        kv: -1,
        tv: -1,
        id: mid.trim()
    });
    
    ctx.rest(result.data);
    result = null;
}

module.exports = {
    lyric
}